package com.example.util;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public abstract class DBUtils {
	static {
		
		
	}
	
	public static Connection getConnection(DatabaseConfig databaseConfig) throws SQLException{
		Connection conn = null;
		
		if (databaseConfig != null){
			conn = DriverManager.getConnection(databaseConfig.getUrl(), databaseConfig.getUser(), databaseConfig.getPassword());
		}
		
		return conn;
	}
	
}